package org.custom.spring.boot.datasource.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Map;

/**
 * SQL相关参数属性
 *
 * @author 李坤
 * @date 2022/3/31 19:30
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("待解析SQL实体类")
public class StatementPropertity implements Serializable {
    /**
     * SQL语句
     */
    @NotEmpty(message = "SQL语句不能为空")
    @ApiModelProperty(value = "metaSql", notes = "原始SQL")
    private String metaSql;

    /**
     * SQL动态参数
     */
    @ApiModelProperty(value = "params", notes = "SQL参数配置")
    private Map<String, Object> params;
}
